<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    div{
      width: 100px;
      height: 100px;
      border: 1px solid firebrick;
    }

    #big>div>div{
      width: 50px;
      height: 50px;
      background-color: cyan;
      position: absolute;
        left: 0px;
        top: 0px;
    }

    #big>div{
        width: 100px;
        height: 100px;
        background-color: red;
        margin: 50px 0 0 50px;
        /*如果想让绝对定位的元素位置偏移,一某个元素做为参照物,需要给元素(参照物添加相对
        定位)*/
        position:relative;
    }

    #big{
        width: 200px;
        height: 200px;
        background-color: green;
        margin: 100px 0 0 100px;
    }

    #d1{
            position: absolute;
        background-color: brown;
            right: 20px;
            bottom: 20px;
    }
  </style>
</head>
<body>
<div id="big">
  <div>
    <div></div>
  </div>
</div>
<div id="d1">div1</div>
<div>div2</div>
<div>div3</div>
</body>
</html>